import { stringify } from 'qs';
import request from '@/utils/request';

// 我的申请
export function getmyprocesslist(params) {
    return request('/api/oa/v1/workflow/myprocess/getmyprocesslist', {
        method: 'POST',
        data: params
    });
}

// 申请类型
export function getApplyType() {
    return request('/api/oa/v1/workflow/template/processtypelist', {
        method: 'POST'
    });
}

// 撤销申请
export function canclemyprocess(
    applicationName,
    applicationNo,
    processInstanceId
) {
    return request(
        `/api/oa/v1/workflow/myprocess/cancelmyprocess?${stringify({
            applicationName,
            applicationNo,
            processInstanceId
        })}`,
        {
            method: 'POST'
        }
    );
}
